<?php
	$link = mysqli_connect('localhost', 'root', '') or die("Failed to connect to MySQL: " . mysql_error());
	if (mysqli_connect_errno()) {
	    echo 'Failed to connect to MySQL';
	    exit;
	}
	$sql = "USE web_db";
	$query = mysqli_query($link,$sql);

	echo $_POST['desc'];
	echo "<br>";
	echo $_POST['mision'];

	$desc = $_POST['desc'];
	$num = $_POST['mision'];

	$sql = "UPDATE mission
			SET description = '$desc'
			WHERE miss_nr = $num";
	$query = mysqli_query($link,$sql);
	header("location:missions.php");
?>